﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 公司
    /// </summary>
    [Index(nameof(Code), IsUnique = true)]
    public partial class TCompany
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 公司编码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 公司名称
        /// </summary>
        [StringLength(50)]
        public string Name { get; set; }
        /// <summary>
        /// 分类Id：对应字典项Id
        /// </summary>
        public int? TypeId { get; set; }
        /// <summary>
        /// 分类名称：对应字典项名称
        /// </summary>
        public string TypeName { get; set; }
        /// <summary>
        /// 公司地址
        /// </summary>
        public string AddrDetail { get; set; }
        /// <summary>
        /// 联系人
        /// </summary>
        public string Contact { get; set; }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string Tel { get; set; }
        /// <summary>
        /// 联系人手机号
        /// </summary>
        public string ContactMobile { get; set; }
        /// <summary>
        /// 联系人邮箱
        /// </summary>
        public string Email { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        public int DisplayOrder { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }
        /// <summary>
        /// 创建人Id
        /// </summary>
        public int? CreateUserId { get; set; }
        /// <summary>
        /// 创建人名称
        /// </summary>
        public string CreateUserName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyDate { get; set; }
        /// <summary>
        /// 修改用户Id
        /// </summary>
        public int? ModifyUserId { get; set; }
        /// <summary>
        /// 修改用户名称
        /// </summary>
        public string ModifyUserName { get; set; }
        /// <summary>
        /// 当前登录人Id
        /// </summary>
        [NotMapped]
        public int NowUserId { get; set; }

        /// <summary>
        /// 当前登陆人名称
        /// </summary>
        [NotMapped]
        public string NowUserRealName { get; set; }
    }
}
